home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 009a / quad21.zip / QUADRIVE.DOC next >
Text File  |  1991-10-07  |  19KB  |  312 lines

  1.                                   QUADRIVE
  2.                       Copyright 1991 Ronald Q. Smith
  3.  
  4. QUADRIVE is a DOS diskette driver for use with 1.2MB 5 1/4" diskette drives.  It
  5. works with many IBM and other fully compatible personal computers to add support
  6. for a 720KB format using standard 360KB floppy disks.  QUADRIVE will allow you
  7. to read, write, format, and use most DOS compatible utilities as if your drive
  8. was a 3 1/2" 720KB drive.  This is the format used by the Tandy model 2000 and a
  9. few other vendors, so you can interchange diskettes between those systems and
  10. your new system.  It may also be useful for making exact copies of 720KB 3 1/2"
  11. diskettes when you have one 3 1/2" drive and the 1.2MB drive.  If you have a
  12. system with a true 720KB 5 1/4" drive, QUADRIVE will allow you to use that
  13. drive with standard DOS functions.
  14.  
  15. DEFINITION OF SHAREWARE
  16.  
  17. Shareware distribution gives users a chance to try software before buying it. If
  18. you try a Shareware program and continue using it, you are expected to register.
  19. Individual programs differ on details -- some request registration while others
  20. require it, some specify a maximum trial period. With registration, you get
  21. anything from the simple right to continue using the software to an updated
  22. program with printed manual.
  23.  
  24. Copyright laws apply to both Shareware and commercial software, and the copy-
  25. right holder retains all rights, with a few specific exceptions as stated below.
  26. Shareware authors are accomplished programmers, just like commercial authors,
  27. and the programs are of comparable quality. (In both cases, there are good
  28. programs and bad ones!) The main difference is in the method of distribution.
  29. The author specifically grants the right to copy and distribute the software,
  30. either to all and sundry or to a specific group. For example, some authors
  31. require written permission before a commercial disk vendor may copy their
  32. Shareware.
  33.  
  34. Shareware is a distribution method, not a type of software. You should find
  35. software that suits your needs and pocketbook, whether it's commercial or
  36. Shareware. The Shareware system makes fitting your needs easier, because you can
  37. try before you buy.  And because the overhead is low, prices are low also.
  38. Shareware has the ultimate money-back guarantee -- if you don't use the product,
  39. you don't pay for it.
  40.  
  41. DISCLAIMER - AGREEMENT
  42.  
  43. Users of QUADRIVE must accept this disclaimer of warranty:
  44. "QUADRIVE is supplied as is.  The author disclaims all warranties, expressed or
  45. implied, including, without limitation, the warranties of merchantability and of
  46. fitness for any purpose.  The author assumes no liability for damages, direct or
  47. consequential, which may result from the use of QUADRIVE."
  48.  
  49. QUADRIVE is a "shareware program" and is provided at no charge to the user for
  50. evaluation.  Feel free to share it with your friends, but please do not give it
  51. away altered or as part of another system.  The essence of "user-supported"
  52. software is to provide personal computer users with quality software without
  53. high prices, and yet to provide incentive for programmers to continue to develop
  54. new products.  
  55.  
  56. If you find this program useful and find that you are using QUADRIVE and 
  57. continue to use QUADRIVE after a reasonable trial period, you must make a 
  58. registration payment of $20 to Ronald Q. Smith at the address below.  The
  59. $20 registration fee will license one copy for use on any one computer at any
  60. one time.  For one year after receipt of the this registration fee, you will
  61. recieve notification of the availability of any updates.  If you report a bug
  62. within 3 months of receipt of the registration fee, you will receive a 
  63. correction to the problem or the fee will be refunded to you.  For a $45 
  64. registration fee you will receive the latest version including a copy of the 
  65. source code and technical documentation on the source code.  You will also
  66. automatically receive any updates for one year.  If you report a bug within 3
  67. months of receipt of the registration fee, you will receive a correction to
  68. the problem or the fee will be refunded to you.  If you license the source
  69. code, you may use it to maintain your copy of QUADRIVE and as a source of
  70. information.  You may not use any or all of it in your own products without 
  71. first obtaining authorization from Ronald Q. Smith.
  72.  
  73. You must treat this software just like a book.  An example is that this 
  74. software may be used by any number of people and may be freely moved from one 
  75. computer location to another, so long as there is no possibility of it being 
  76. used at one location while it's being used at another.  Just as a book cannot 
  77. be read by two different persons at the same time.
  78.  
  79. Commercial users of QUADRIVE must register and pay for their copies of QUADRIVE
  80. within 30 days of first use or their license is withdrawn.  Site-License
  81. arrangements and volume discounts may be made by contacting Ronald Q. Smith.
  82.  
  83. Anyone distributing QUADRIVE for any kind of remuneration must first contact
  84. Ronald Q. Smith at the address below for authorization.
  85.  
  86. Send fees and any inquiries to:
  87.  
  88.                         Ronald Q. Smith
  89.                         11 Black Oak Road
  90.                         North Oaks, Mn. 55127-6204
  91.  
  92. You may also contact me via CompuServ mail at userid 71620,514.  I will be happy
  93. to respond to any problems and suggestions for future capabilities.
  94.  
  95. You are encouraged to pass a copy of QUADRIVE along to your friends for evalua-
  96. tion.  Please encourage them to register their copy if they find that they can
  97. use it.
  98.  
  99.  
  100. USING QUADRIVE
  101.  
  102. QUADRIVE allows you to use any mixture of 160KB, 180KB, 320KB, 360KB, 720KB, and
  103. 1.2MB formats on the drive.  The new 720KB format is identical in all respects
  104. except pysical size to the 3 1/2" 720KB format.  In fact, DOS utilities such as
  105. FORMAT and DISKCOPY will believe that it is a 3 1/2" 720KB media.  QUADRIVE will
  106. also allow you to read and write your Tandy and DEC 720KB diskettes that your
  107. new system doesn't support.  At least these vendors and probably several others
  108. supported a 720KB capacity on 5 1/4" diskettes.  That is the capacity that
  109. QUADRIVE supports.  The full capabilities of QUADRIVE are only available with
  110. DOS data formats and structures.  It will not support CP/M or other non-standard
  111. formats for file access.  You will be able to format, disk copy, and disk
  112. compare any 8 or 9 sector-per-track and 40 or 80 cylinder format even if it is
  113. not otherwise a DOS format.  There are many very good commercial software
  114. packages that provide support for file access for CP/M and many other formats.
  115.  
  116. Note that a DOS device driver is only effective when all access to the device is
  117. via DOS.  This includes both files and the drive oriented interfaces such as INT
  118. 25H and INT 26H.  Any application that uses the BIOS directly, such as many
  119. backup utilities, will not be able to use QUADRIVE.  DOS BACKUP and RESTORE
  120. will, however, work correctly.  Non-DOS formatters such as Central Point
  121. Software's PCFORMAT will not correctly support this capacity.  They make direct
  122. calls to the BIOS and so don't take advantage of QUADRIVE's BIOS helper that
  123. tells the BIOS how to handle the 720KB format.
  124.  
  125. The 720KB capacity is inherent in the 1.2MB disk controller and in all 360KB
  126. floppy media.  No drive or media specifications are being exceeded.  This is
  127. just a format the Microsoft and IBM chose not to support.
  128.  
  129. The driver is configured in CONFIG.SYS with the statement:
  130.  
  131. DEVICE=QUADRIVE.SYS /D:d1 [/D:d2] [/D:d3] [/D:d4]
  132.  
  133. QUADRIVE will support up to four devices concurrently.  The parameters d1 
  134. through d4 are physical device numbers for which you want 720KB support.  
  135. They must represent 1.2MB drives and controllers.  These are the physical drive 
  136. numbers 0 and 1 and not DOS drive letters A:, B:, etc.  Thus if you have a 
  137. single floppy drive, you would specify DEVICE=QUADRIVE.SYS /D:0.
  138.  
  139. You may repeat the same physical device number two or more times.  This will
  140. assign multiple drive letters to the same drive just as DOS assigns both A:
  141. and B: to drive 0 if you don't have a drive 1.  You will be prompted to change
  142. diskettes with the familiar DOS message when you change the drive letter.
  143.  
  144. Be sure that you have LASTDRIVE set large enough to accommodate the new drive
  145. letters that will be created.  If you have one or two floppy disks, a hard disk,
  146. and a RAM disk, the default value for LASTDRIVE of E will allow you to add
  147. QUADRIVE for one of the floppy drives.
  148.  
  149. Once QUADRIVE is installed you may refer to the same drive by at least two
  150. names.  In fact, you will often have three names by which to refer to that
  151. drive.  If you have a single floppy system, DOS will assign the names A: and B:
  152. to that drive and QUADRIVE will add D: or E:.  While DOS will carefully prompt
  153. you when switching between drives A: and B:, it is unaware that D: is also the
  154. same drive.  Thus you will not be able to successfully execute a COPY A:file
  155. D:file command as you will not have time to change floppies.
  156.  
  157. If you have a single floppy system and used the following CONFIG.SYS statement,
  158. you will have four drive letters by which you may refer to the drive.
  159.  
  160. DEVICE=QUADRIVE.SYS /D:0 /D:0
  161.  
  162. When toggling between A: and B: or D: and E: you will see the prompt message.  
  163. However, DOS thinks that A: and B: refer to a 1.2MB drive and that D: and E:
  164. refer to a 3 1/2" 720KB drive and will not prompt you when changing between
  165. A: and D: or E: (or between B: and D: or E:).
  166.  
  167. Since QUADRIVE will let you read and write all of the existing 5 1/4" formats
  168. as well as the new 720KB format, it may occur to you to wonder why it doesn't
  169. simply add that capability to drive letter A: (and B:).  There are actually
  170. two reasons.  One is that DOS does not define anyway for a device driver to
  171. redefine any of the standard drives (usually A: through C:).  It is possible
  172. only by using undocumented interfaces and we want to avoid that in order to
  173. retain the greatest level of compatibility.  The more important reason is that
  174. FORMAT.COM is just too smart for its own good.  FORMAT "knows" that you can't
  175. mix those capacities on the same drive.  If it thinks the drive is a 1.2MB
  176. drive, it will not let you select the 720KB capacity and vice versa.  This is
  177. built right into FORMAT and we really don't want to require a non-standard
  178. FORMAT program when simply using an additional drive letter avoids it.
  179.  
  180. So, you can read, write, and perform any other function that doesn't require
  181. formatting using the QUADRIVE drive letter, and you can do it using all of
  182. supported formats.  If you use a function that requires formatting, you must
  183. use the QUADRIVE letter for 720KB diskettes and the DOS A: or B: drive letter
  184. for other formats.  Functions that may require formatting are FORMAT, DISKCOPY,
  185. and BACKUP.  DISKCOPY and BACKUP only require formatting if the target disk is
  186. not already formatted.
  187.  
  188. You can use DISKCOPY, DISKCOMP, and many other copying programs with your
  189. QUADRIVE drive.  Just use DISKCOPY E: E: or DISKCOPY E: F: to copy from one 
  190. 720KB floppy to another.  DISKCOPY and others include their own prompting 
  191. capability and will notify you when to change diskettes if you use the same
  192. drive letter for both the source and the target.  Due to limitations in 
  193. DISKCOPY you may not be able to copy from a 720KB diskette to a previously 
  194. formatted 360KB diskette without reformatting the target first.  While 
  195. DISKCOPY will normally format the target as it writes if it discovers that the 
  196. target is not formatted, it will see the first track on the previously formatted
  197. 360KB diskette as correctly formatted.  When it tries to write the second track 
  198. and gets an error, DISKCOPY assumes that the diskette is actually damaged and 
  199. not just unformatted.  That is, DISCOPY will only format if it is unable to 
  200. write the first track, and a 360KB floppy has a correct appearing first track 
  201. in 720KB mode.  If this happens to you, simply format the target floppy with 
  202. FORMAT E: (or whatever the QUADRIVE drive letter is) and then repeat your 
  203. DISKCOPY.  The same rule applies to BACKUP.
  204.  
  205. TECHNICAL STUFF
  206.  
  207. The earliest floppy drives supported one or two sides, 40 tracks, and 8 or 9
  208. sectors per track for capacities of 160KB, 180KB, 320KB, and 360KB.  The
  209. read/write heads in the drives required a wide data area and a wide gap (by
  210. today's standards) for each track.  As the technology for heads and media
  211. improved, the width of the data area and gap were reduced to half the earlier
  212. value.  When a modern 360KB drive reads or writes a floppy disk, it leaves a
  213. very wide gap between the tracks.  It is basically using every other track on
  214. the device even though it calls them track (cylinder) 0, 1, etc.
  215.  
  216. By the mid-1980s several PC vendors were using the 720KB format.  These included
  217. some DEC and Tandy systems.  They simply made small changes to the drive
  218. controller and the BIOS to use every track.  When they had to handle an "old"
  219. 360KB floppy, the BIOS simply doubled the track (cylinder) number requested. 
  220. This format never caught on generally, but QUADRIVE will successfully handle
  221. most of those old diskettes.
  222.  
  223. When the 1.2MB drive was introduced, it supported the use of both all the tracks
  224. on the drive and higher density media that permitted 15 sectors per track.  Like
  225. the other early implementations, when presented with a 360KB diskette, the BIOS
  226. simply doubles the track number for all operations.  This then provides the
  227. opportunity for QUADRIVE to use those intervening tracks.
  228.  
  229. The IBM PC/AT BIOS defined a state machine for its floppy BIOS.  As part of the
  230. implementation, the BIOS attempts to sense the format of the media and respond
  231. properly without you having to tell it in advance what capacity you are using. 
  232. The BIOS keeps a value that tells it what kind of media it is currently 
  233. handling.  If you insert a new diskette, the BIOS sets the media type to 
  234. unknown.  Whenever the BIOS handles a request for an "unknown" media, it first 
  235. tries to use the 360KB format.  If that gets an I/O error, it tries the 1.2MB 
  236. format.  Whichever one succeeds causes the BIOS's state for the drive to be set 
  237. to "determined" and the media type.  The media type state is actually a bit 
  238. mask which tells the BIOS what transfer rate to use, whether to double track 
  239. numbers, and how many sectors per track to permit.
  240.  
  241. The BIOS only has two values that it places in the state.  These are a 1.2 MB
  242. media type, 15 sectors, and no doubling or 360KB media type, 9 sectors, and
  243. doubling.  QUADRIVE takes advantage of this design to create another state value
  244. that looks identical to the BIOS 360KB value except that the doubling bit is not
  245. set.  As long as QUADRIVE sets this value in the state before every I/O opera-
  246. tion, it all works.  
  247.  
  248. The reason that you need a full device driver rather than just a little TSR that
  249. sets the state is that you want to be able to continue to use the 360KB and
  250. 1.2MB formats.  With a device driver, DOS tells QUADRIVE what format it is
  251. expecting and QUADRIVE knows whether to set the state or not.  This is the
  252. technique that allows you to use drive letter A: for 1.2MB and 360KB formats and
  253. drive letter E: for 720KB formats.
  254.  
  255. Actually, QUADRIVE will automatically adjust for reading and writing all media
  256. formats from 160KB, 180KB, 320KB, and 360KB to 720KB and 1.2MB.  However, you
  257. cannot FORMAT anything other than the 720KB with the QUADRIVE drive letter. 
  258. Unfortunately, while DOS would happily allow QUADRIVE to handle all of these and
  259. does, the FORMAT program itself has an error check which says that the 720KB
  260. format cannot be used on the same drive as the other formats.  It is trying to
  261. keep you from accidentally asking to format a true 3 1/2" diskette at 360KB or
  262. 1.2 MB or vice versa.  Thus it will display an error message and not even try.
  263.  
  264. Basically, a few programs like FORMAT ask the device driver what physical type
  265. of drive they support and will only allow the capacity options that they know
  266. about for those physical types.  In order for QUADRIVE to get FORMAT to work at
  267. all, it must always respond that this is a 3 1/2" drive type.  FORMAT then
  268. refuses to accept a request for any of the other capacities.
  269.  
  270. QUADRIVE will only work with those BIOS implementations (IBM, Mitsubishi,
  271. Phoenix, etc.) that compatibly implement the multi-media state machine described
  272. in the IBM PC/AT Technical Reference manual.
  273.  
  274. INSIDE QUADRIVE
  275.  
  276. If you choose to license the source code, you will see that it is fully 
  277. annotated with an explanation of what DOS expects from a device driver and
  278. the mechanics of the BIOS state machine.  In writing QUADRIVE, I discovered 
  279. that the DOS documentation is often incomplete or misleading and is actually
  280. wrong in a few places.  It takes a lot of trial and error and time spent with
  281. a debugger to determine what DOS actually wants in all cases.
  282.  
  283. QUADRIVE is written in Microsoft MASM 6.00.  You would need that version of the
  284. assembler to use the source code, but you can use it as a source of information
  285. without anything more than an understanding of assembler code and a copy of a
  286. DOS technical reference manual such as the "Microsoft MS-DOS Programmer's
  287. Reference".  In spite of my comment about its completeness, it is an invaluable
  288. source of information for anyone writing system-level programs.  I also 
  289. recommend "Undocumented DOS" by Andrew Schulman, Raymond J. Michels, Jim Kyle,
  290. Tim Paterson, David Maxey, and Ralf Brown.  It does not have as much information
  291. on device drivers but the insite into the inner workings of DOS were very
  292. valuable in trying to figure out what DOS really wants.
  293.  
  294. IBM is a registered trademark of International Business Machines Corporation.
  295. MS-DOS and Microsoft are registered trademarks of Microsoft Corporation.
  296.  
  297. REVISION HISTORY
  298.  
  299. 911006  -       Version 2.10:  Added support for up to four drives.  Added
  300.                 support for multiple drive letters for a drive including
  301.                 generating diskette change messages.
  302.  
  303. 910927  -       Version 2.00:  Updated for DOS 3.3 through 5.0.  Use 1.2MB
  304.                 drive to support 720KB.
  305.  
  306.  
  307. 850612  -       Version 1.10:  Added support for 720KB drives on Sperry PC-1
  308.                 and PC/HT.
  309.  
  310. 840819  -       Version 1.00:  Original version.  Support 720KB drive on IBM
  311.                 PC-1 under DOS 2.10.
  312.